#include<iostream>
#include<stdio.h>
#include<stdlib.h>
#include<unistd.h>

int main()
{
  pid_t id = fork();
  if(id < 0){
    perror("fork");
    return 1;
  }
  else if(id > 0){
    printf("parent[%d] is sleeping...\n",getpid());
    sleep(30);
  }
  else{
    printf("child[%d] is begin z...\n",getpid());
    sleep(5);
    exit(1);
  }
  return 0;
}
